package com.rt.tmpt.others.db;

import org.apache.commons.dbcp.BasicDataSource;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;

public class FixedBasicDataSource extends BasicDataSource {
	
	 @Override
	 public synchronized void close() throws SQLException {          
		 DriverManager.deregisterDriver(DriverManager.getDriver(url)); 
		 super.close();      
	 }

	@Override
	public Logger getParentLogger() throws SQLFeatureNotSupportedException {
		return null;
	}
}
